package com.wngbms.spring_boot_learn.selector;

import org.springframework.context.annotation.DeferredImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * 实现 DeferredImportSelector 接口的类 不会注入到容器中, 而是会将selectImports返回的类型注入到容器中.
 */
public class MyDeferredImportSelector implements DeferredImportSelector {
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        System.out.println("MyDeferredImportSelector.selectImports");
        return new String[0];
    }


    @Override
    public Class<? extends Group> getImportGroup() {
        return DeferredImportSelector.super.getImportGroup();
    }
}
